package com.coolingme.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.coolingme.domain.entity.UserRole;

import java.util.List;

public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * 批量更新或插入
     *
     * @param userId     用户id
     * @param roleIdList 角色id集合
     */
    void insertOrUpdateList(@Param("userId") Integer userId, @Param("roleIdList") List<Integer> roleIdList);

    /**
     * 批量更新或插入
     *
     * @param userId     用户id
     * @param roleIdList 角色id集合
     */
    void deleteList(@Param("userId") Integer userId, @Param("roleIdList") List<Integer> roleIdList);

}